<template>
    <div>
        <vue-ueditor-wrap v-model="text" :content="content" :config="config"></vue-ueditor-wrap>
    </div>
</template>
<script>
import VueUeditorWrap from "vue-ueditor-wrap";
export default {
    props: {
        content: String
    },
    components: {
        VueUeditorWrap
    },

    data() {
        return {
            text: '',
            config: {
                autoHeightEnabled: false,
                initialFrameHeight: 500,
                initialFrameWidth: "100%",
                serverUrl: "http://platform.cfuhui.com/manage/common/editor/",
                UEDITOR_HOME_URL: "/static/ueditor/"
            }
        };
    },
    created() { 
        this.text = this.content;
    },
    watch: {
        text: function() {
            this.$emit("ueditor-change", {
                content: this.text
            });
        }
    }
};
</script>